package com.msb;



/**
 * @author lidexin
 * @create 2021-09-18 21:47
 */
public class T02_HowToCreateThread {
    static class MyThread extends Thread {
        @Override
        public void run() {
            System.out.println("Hello MyThread!");
        }

        static class MyRun implements  Runnable {
            @Override
            public void run() {
                System.out.println("Hello MyRun!");
            }
        }

        public static void main(String[] args) {
            new MyThread().start();
            new Thread(new MyRun()).start();
            new Thread(() -> {
                System.out.println("Hello Lambda!");
            }).start();
        }
    }
}
//请你告诉我启动线程池的三种方式
//1.Thread
//2.Runnable
//3.Executors.newCachedThread
